Limit GitHub installs and fetch assets directly - #1401
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GitHub asset URLs now fetch the requested file directly from
raw.githubusercontent.com. Assets from large repositories such as Fluent UI Emoji remain available without installing the repository, even when it has already been recorded as oversized. URLs with a build target segment first redirect to the canonical asset URL, preserving escaped paths and query strings. Responses retain MIME types, immutable caching, ETags, and HEAD support, with a 50 MiB file limit and a 30-second download timeout.Module builds still install their repositories. Installs enforce a 256 MiB limit on downloaded and unpacked archives and a 30-second deadline covering download and extraction. Failures remove partial files. Oversized repositories are recorded under
<workDir>/gh-too-large/; later installs of any ref returnrepo is too largewithout downloading again, including after a restart. Repository names are matched case-insensitively, and timeouts and caller cancellations remain retryable.The Fluent UI Emoji integration test is restored. The import-map resolution test pins React DOM to 19.2.4 to match its referrer and scheduler expectations and reports errors when adding the import.
Validation:
go test ./server ./internal/* -count=1passed. Regression coverage includes direct asset requests, missing files, escaped paths, conditional requests, HEAD, file limits, module installation, archive limits, persistent rejection across refs, and cancellation.deno test -A --unstable-fs --check --no-lock --reload=http://localhost:8080 --location=http://0.0.0.0/ -q test/fixed-url/ test/gh/.